package me.firstapp.spi.bbs;

import java.util.Map;

import me.firstapp.common.json.PageObject;
import me.firstapp.common.json.SingleObject;
import me.firstapp.common.module.bbs.JsonReply;
import me.firstapp.common.module.bbs.JsonReplyInManage;

public interface ReplyService {

	/**
	 * 调用获取话题回复数量接口
	 * 
	 * @param topicId
	 * @return
	 */
	SingleObject<Long> findTopicReplyCounts(Long topicId);

	/**
	 * 调用获取话题回复数量接口
	 * 
	 * @param topicId
	 * @param apiClientId
	 * @return
	 */
	SingleObject<Long> findTopicReplyCounts(Long topicId, Long apiClientId);

	/**
	 * 调用新增回复接口
	 * 
	 * @param content
	 * @param topicId
	 * @param fromMemberId
	 * @param toMemberId
	 * @return
	 */
	SingleObject<JsonReply> addReply(String content, Long topicId, Long fromMemberId, Long toMemberId);

	/**
	 * 调用分页查询回复接口
	 * 
	 * @param pageNo
	 * @param pageSize
	 * @param topicId
	 * @param memberId
	 * @return
	 */
	PageObject<JsonReply> findReplyPage(Integer pageNo, Integer pageSize, Long topicId, Long memberId);

	/**
	 * 调用分页查询回复接口
	 * 
	 * @param topicId
	 * @param pageNo
	 * @param pageSize
	 * @param searchParams
	 * @param sortParam
	 * @param sortType
	 * @return
	 */
	PageObject<JsonReplyInManage> findRepliesPageByParams(Long topicId, Integer pageNo, Integer pageSize,
			Map<String, Object> searchParams, String sortParam, String sortType);

	/**
	 * 调用通过id查询回复接口
	 * 
	 * @param replyId
	 * @return
	 */
	SingleObject<JsonReply> findReplyById(Long replyId);

	/**
	 * 调用删除回复接口
	 * 
	 * @param replyIds
	 * @return
	 */
	SingleObject<Object> deleteReplies(String replyIds);
}
